# -*- coding: utf-8 -*-
"""
@Project ：dz-at-web 
@File    ：el_permission_open.py
@Author  ：罗昕晖
@Date    ：2021/7/2 9:57
"""
permission = {
    '交易权限管理': {
        '创业板': ['xpath', '//*[contains(text(),"创业板")]/following-sibling::*/*[1]/*[2]'],
        '科创板': ['xpath', '//*[contains(text(),"科创板")]/following-sibling::*/*[1]/*[2]'],
        '风险警示板': ['xpath', '//*[contains(text(),"风险警示板")]/following-sibling::*/*[1]/*[2]'],
        '可转债': ['xpath', '//*[contains(text(),"可转债")]/following-sibling::*/*[1]/*[2]'],
        '基础设施基金': ['xpath', '//*[contains(text(),"基础设施基金")]/following-sibling::*/*[1]/*[2]'],
        '新三板': ['xpath', '//*[contains(text(),"新三板")]/following-sibling::*/*[1]/*[2]'],
        '风险不符合提示': ['xpath', '//*[contains(text(),"您的风险等级不符合")]'],
        '随日融': ['xpath', '//*[contains(text(),"随日融")]/following-sibling::*/*[1]/*[2]'],
        '继续开通': ['xpath', '/html/body/div[7]/div[3]/button[2]']
    }
}

risk = {
    '风险警示板': {
        '已满足': ['xpath', "//*[contains(text(),'已满足')]"],
        '风险警示权限': ['xpath', "//*[contains(text(),'风险警示权限')]"],
        '可开通': ['xpath', '//*[contains(text(),"可开通")]/preceding-sibling::*[1]'],
        '未签署': ['xpath', "//*[contains(text(),'未签署')]"],
        '相关协议': ['id', "the-canvas1"],
        '提交成功': ['xpath', "//*[contains(text(),'提交成功')]"],
        '办理成功': ['xpath', "//*[contains(text(),'办理成功')]"],
    }
}

convertible_bond = {
    '可转债': {
        '未开通': ['xpath', '//*[contains(text(),"未开通")]/preceding-sibling::*[1]'],
        '适当性评估': ['xpath', '//*[contains(text(),"适当性评估结果确认书")]'],
        '向不特定对象发行': ['xpath', '//*[contains(text(),"向不特定对象发行")]'],
        '问卷回访': ['xpath', '//*[contains(text(),"问卷回访")]'],
        '可转债权限已开通成功': ['xpath', '//*[contains(text(),"您的可转债权限已开通成功")]'],
        '账户选择提示': ['xpath', '//*[contains(text(),"* 如需开通信用账户的权限，请选择普通账户与信用账户同时开通。")]'],
    }
}
reits = {
    '基础设施基金': {
        '未开通': ['xpath', '//*[contains(text(),"未开通")]/preceding-sibling::*[1]'],
        '服务不适当警示': ['xpath', '//*[contains(text(),"服务不适当警示及客户投资确认书")]'],
        '公开募集基础设施': ['xpath', '//*[contains(text(),"公开募集基础设施证券投资基金风险揭示书")]'],
        '基础设施基金权限已开通成功': ['xpath', '//*[contains(text(),"您的基础设施基金权限已开通成功")]'],
    }
}
